<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>主机备件管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<br/>
	<form:form id="searchForm" modelAttribute="zlmtAccessoryInout" action="${ctx}/inventory/zlmtAccessoryInout/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label class="control-label">备件名：</label>
				<form:input path="accessoryName" htmlEscape="false" maxlength="128" class="input-small "/>
			</li>
			<li><label class="control-label">备件分类：</label>
				<form:select path="accessoryCategory" class="input-small">
					<form:option value="" label="全部"/>
					<form:options items="${fns:getDictList('accessory_cate')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>

			<li><label class="control-label">入库/出库：</label>
				<form:select path="inoutType" class="input-medium">
					<form:option value="" label="全部"/>
					<form:option value="IN" label="入库"/>
					<form:option value="OUT" label="出库"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>备件名称</th>
				<th>备件分类</th>
				<th>处理人</th>
				<th>出入库</th>
				<th>数量</th>
				<th>主机名</th>
				<th>时间</th>
				<th>备注信息</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="zlmtAccessoryInout">
			<tr>
				<td>
						${zlmtAccessoryInout.accessoryName}
				</td>
				<td>
						${fns:getDictLabel(zlmtAccessoryInout.accessoryCategory, "accessory_cate", "未知")}
				</td>
				<td>
						${zlmtAccessoryInout.user.name}
				</td>
				<td>
						${zlmtAccessoryInout.inoutType}
				</td>
				<td>
						${zlmtAccessoryInout.amount}
				</td>
				<td>
						${zlmtAccessoryInout.hostName}
				</td>
				<td>
					<fmt:formatDate value="${zlmtAccessoryInout.createDate}" pattern="yyyy-MM-dd HH:mm"/>
				</td>
				<td>
					${zlmtAccessoryInout.remarks}
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>